
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>写在前面的话 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="2.搭建环境.html" />
    
    
    <link rel="prev" href="../" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2" data-path="1.写在前面的话.html">
            
                <a href="1.写在前面的话.html">
            
                    
                    写在前面的话
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="2.搭建环境.html">
            
                <a href="2.搭建环境.html">
            
                    
                    第一章 搭建环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    第二章 模型定义
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="3.sequelize 实例变量.html">
            
                <a href="3.sequelize 实例变量.html">
            
                    
                    2.1 实例变量方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="4.定义一个模型.html">
            
                <a href="4.定义一个模型.html">
            
                    
                    2.2 定义一个模型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="5.模型字段类型.html">
            
                <a href="5.模型字段类型.html">
            
                    
                    2.3 模型字段类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="6.导入与配置.html">
            
                <a href="6.导入与配置.html">
            
                    
                    2.3 导入与配置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="3模型关系.html">
            
                <a href="3模型关系.html">
            
                    
                    第三章 模型关系
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="3.1属于.html">
            
                <a href="3.1属于.html">
            
                    
                    3.1 属于
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="3.2包含.html">
            
                <a href="3.2包含.html">
            
                    
                    3.2 包含
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="3.3一对多.html">
            
                <a href="3.3一对多.html">
            
                    
                    3.3 一对多
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="3.4多对多.html">
            
                <a href="3.4多对多.html">
            
                    
                    3.4 多对多
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="3.5多态一对多.html">
            
                <a href="3.5多态一对多.html">
            
                    
                    3.5 多态一对多
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="3.6多态多对多.html">
            
                <a href="3.6多态多对多.html">
            
                    
                    3.6 多态多对多
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="3.7关系嵌套.html">
            
                <a href="3.7关系嵌套.html">
            
                    
                    3.7 关系嵌套
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="4模型查询.html">
            
                <a href="4模型查询.html">
            
                    
                    第四章 模型查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="5查询范围.html">
            
                <a href="5查询范围.html">
            
                    
                    第五章 查询范围 Scope (预定义查询条件)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="6生命周期函数.html">
            
                <a href="6生命周期函数.html">
            
                    
                    第六章 生命周期函数 Hook
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="7migrate.html">
            
                <a href="7migrate.html">
            
                    
                    第七章 数据库迁移 Migrate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="8tabel2model.html">
            
                <a href="8tabel2model.html">
            
                    
                    第八章 根据 Table 生成 Model
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >写在前面的话</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5199;&#x5728;&#x524D;&#x9762;&#x7684;&#x8BDD;">&#x5199;&#x5728;&#x524D;&#x9762;&#x7684;&#x8BDD;</h1>
<p>&#x6211;&#x65F6;&#x5E38;&#x4F1A;&#x88AB;&#x95EE;&#x5230;&#xFF0C;&#x6211;&#x662F;&#x4E00;&#x540D;&#x524D;&#x7AEF;&#x5F00;&#x53D1;&#x5DE5;&#x7A0B;&#x5E08;&#xFF0C;&#x60F3;&#x8981;&#x5B66;&#x4E60;&#x4E00;&#x4E9B; Node.js &#x7684;&#x77E5;&#x8BC6;&#x5F00;&#x53D1; Web &#x670D;&#x52A1;&#x540E;&#x7AEF;&#xFF0C;<strong>&#x6211;&#x8BE5;&#x5B66;&#x4E60;&#x4E9B;&#x4EC0;&#x4E48;&#x77E5;&#x8BC6;&#xFF1F;</strong></p>
<h5 id="&#x6211;&#x7684;&#x56DE;&#x7B54;&#x662F;&#xFF1A;">&#x6211;&#x7684;&#x56DE;&#x7B54;&#x662F;&#xFF1A;</h5>
<blockquote>
<p>&#x540E;&#x7AEF;&#x7684;&#x5176;&#x5B9E;&#x5C31;&#x662F;&#x4E00;&#x76F4;&#x5728;&#x8DDF;&#x6570;&#x636E;&#x5E93;&#x6253;&#x4EA4;&#x9053;&#xFF0C;&#x521D;&#x7EA7;&#x540E;&#x7AEF;&#x5DE5;&#x7A0B;&#x5E08;&#x4E0A;&#x5C97;&#x540E;&#x505A;&#x7684;&#x5C31;&#x662F; CURD&#xFF08;&#x6570;&#x636E;&#x5E93;&#x7684;&#x589E;&#x5220;&#x6539;&#x67E5;&#xFF09;&#x3002;<br>&#x4F46;&#x662F;&#x4E00;&#x4E2A;&#x5408;&#x683C;&#x7684;&#x540E;&#x7AEF;&#x5DE5;&#x7A0B;&#x5E08;&#x9664;&#x4E86;&#x6570;&#x636E;&#x5E93;&#x4F60;&#x8FD8;&#x9700;&#x8981;&#x61C2;&#x4E00;&#x4E9B; Linux &#x7CFB;&#x7EDF;&#x7684;&#x5E38;&#x7528;&#x64CD;&#x4F5C;&#xFF0C;&#x6BD4;&#x5982;&#x8BF4;&#x88C5;&#x4E2A;&#x8F6F;&#x4EF6;&#xFF0C;&#x6539;&#x4E00;&#x6539;&#x914D;&#x7F6E;&#x53C2;&#x6570;&#xFF0C;&#x8FD9;&#x4E9B;&#x77E5;&#x8BC6;&#x90FD;&#x662F;&#x7528;&#x6765;&#x90E8;&#x7F72;&#x6211;&#x5F00;&#x53D1;&#x597D;&#x7684;&#x8F6F;&#x4EF6;&#x7684;&#x3002;<br>&#x800C; Node &#x6A21;&#x5757;&#x5BF9;&#x4E8E;&#x6211;&#x6765;&#x8BF4;&#xFF0C;&#x4EE5;&#x6211;&#x4E2A;&#x4EBA;&#x89C2;&#x70B9;&#x6765;&#x8BF4;&#xFF0C;&#x505A; Web &#x7684;&#x8BDD;&#xFF0C;&#x60F3;&#x6765;&#x60F3;&#x53BB;&#x4E5F;&#x5C31;&#x7528;&#x4E86; path&#x3001;http&#x3001;fs &#x8FD9;&#x51E0;&#x4E2A;&#x6A21;&#x5757;&#xFF0C;&#x7528;&#x7684;&#x771F;&#x4E0D;&#x591A;&#x3002;&#x53CD;&#x800C;&#x66F4;&#x591A;&#x7684;&#x65F6;&#x95F4;&#x4F1A;&#x82B1;&#x5728;&#x5982;&#x4F55;&#x4F7F;&#x7528;&#x4E00;&#x4E9B; npm package &#x4E0A;&#x9762;&#x3002;  </p>
</blockquote>
<p>&#x5982;&#x4ECA;&#xFF0C;&#x5F88;&#x5C11;&#x4EBA;&#x4F1A;&#x76F4;&#x63A5;&#x6784;&#x9020; SQL &#x8BED;&#x53E5;&#xFF08;&#x4E00;&#x79CD;&#x64CD;&#x4F5C;&#x6570;&#x636E;&#x7684;&#x8BED;&#x8A00;&#xFF09;&#x53BB;&#x6570;&#x636E;&#x5E93;&#xFF08;&#x4E00;&#x79CD;&#x5B58;&#x50A8;&#x6570;&#x636E;&#x7684;&#x8F6F;&#x4EF6;&#xFF0C;&#x7C7B;&#x4F3C; Excel&#xFF09;&#x91CC;&#x9762;&#x53BB;&#x64CD;&#x4F5C;&#x5185;&#x5BB9;&#x3002;&#x800C;&#x662F;&#x901A;&#x8FC7;&#x6570;&#x636E;&#x8868;&#x7684;&#x5B57;&#x6BB5;&#x4E0E;&#x6A21;&#x578B; Class &#x7684;&#x5C5E;&#x6027;&#x5F62;&#x6210;&#x6620;&#x5C04;&#xFF0C;&#x5C5E;&#x6027;&#x5373;&#x5B57;&#x6BB5;&#xFF0C;&#x6539;&#x5B8C;&#x5C5E;&#x6027;&#xFF0C;&#x8C03;&#x7528;&#x5BF9;&#x8C61;&#x7684; save &#x65B9;&#x6CD5;&#xFF0C;&#x5373;&#x53EF;&#x628A;&#x4FEE;&#x6539;&#x4E86;&#x7684;&#x5C5E;&#x6027;&#x4FDD;&#x5B58;&#x5230;&#x6570;&#x636E;&#x5E93;&#x4E2D;&#xFF0C;&#x8FD9;&#x79CD;&#x6280;&#x672F;&#x53EB;&#x505A; ORM&#xFF08;&#x5BF9;&#x8C61;&#x5173;&#x7CFB;&#x6620;&#x5C04; Object-Relation Maping&#xFF09;&#x3002;&#x901A;&#x8FC7; ORM &#x4E0D;&#x4EC5;&#x964D;&#x4F4E;&#x4E86;&#x5F00;&#x53D1;&#x96BE;&#x5EA6;&#x3001;&#x800C;&#x4E14;&#x63D0;&#x9AD8;&#x7684;&#x751F;&#x4EA7;&#x6548;&#x7387;&#x3002;</p>
<p>&#x53EF;&#x89C1;&#x638C;&#x63E1;&#x4E00;&#x4E2A; ORM &#x662F;&#x6211;&#x4EEC;&#x5199;&#x540E;&#x7AEF;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x7684;&#x57FA;&#x7840;&#x4E2D;&#x7684;&#x57FA;&#x7840;&#xFF0C;&#x4E5F;&#x662F;&#x91CD;&#x4E2D;&#x4E4B;&#x91CD;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../" class="navigation navigation-prev " aria-label="Previous page: Introduction">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="2.搭建环境.html" class="navigation navigation-next " aria-label="Next page: 第一章 搭建环境">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"写在前面的话","level":"1.2","depth":1,"next":{"title":"第一章 搭建环境","level":"1.3","depth":1,"path":"document/2.搭建环境.md","ref":"./document/2.搭建环境.md","articles":[]},"previous":{"title":"Introduction","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"document/1.写在前面的话.md","mtime":"2017-06-17T11:35:35.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-06-28T08:29:37.466Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

